From e182df95d20b737b577a5670e22ead22974674fb Mon Sep 17 00:00:00 2001 From: Mike Baker Date: Tue, 18 Apr 2006 04:33:39 +0000 Subject: [PATCH] mini_fo works SVN-Revision: 3669 --- openwrt/package/base-files/default/bin/firstboot | 3 ++- openwrt/package/base-files/default/etc/init.d/S99done | 2 +- openwrt/package/base-files/default/etc/preinit | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/openwrt/package/base-files/default/bin/firstboot b/openwrt/package/base-files/default/bin/firstboot index 46106e0e44..7bbf014b5a 100755 --- a/openwrt/package/base-files/default/bin/firstboot +++ b/openwrt/package/base-files/default/bin/firstboot @@ -37,6 +37,7 @@ pivot() { # pivot_root $1 $1$2 && { mount -o move $2/dev /dev mount -o move $2/tmp /tmp + mount -o move $2/jffs /jffs 2>&- return 0 } } @@ -51,7 +52,7 @@ mountdp() { # fopivot() { # root=$1 { - mount -t mini_fo -o base=/,sto=$1 none /mnt 2>&- && root=/mnt + mount -t mini_fo -o base=/,sto=$1 $1 /mnt 2>&- && root=/mnt } || { [ "$3" = "1" ] && mount -o bind $1 $1 && dupe $1 $rom } diff --git a/openwrt/package/base-files/default/etc/init.d/S99done b/openwrt/package/base-files/default/etc/init.d/S99done index e41d4e698c..f49d3103a1 100755 --- a/openwrt/package/base-files/default/etc/init.d/S99done +++ b/openwrt/package/base-files/default/etc/init.d/S99done @@ -3,7 +3,7 @@ sysctl -p >&- # automagically run firstboot [ "$(nvram get no_root_swap)" != 1 ] && { - { mount|grep "on / type tmpfs" 1>&-; } && { + [ -d /tmp/root ] && { lock /tmp/.switch2jffs firstboot switch2jffs lock -u /tmp/.switch2jffs diff --git a/openwrt/package/base-files/default/etc/preinit b/openwrt/package/base-files/default/etc/preinit index 04454f8a95..cf3bfdea51 100755 --- a/openwrt/package/base-files/default/etc/preinit +++ b/openwrt/package/base-files/default/etc/preinit @@ -55,6 +55,7 @@ else } fi +insmod mini_fo 2>&- mount_root ${FAILSAFE:+failsafe} exec /sbin/init -- 2.30.2